/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package org.smarttmt.smartmanager.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author nicolas
 */
@Entity
@Table(name = "SOLUCION")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Solucion.findAll", query = "SELECT s FROM Solucion s"),
    @NamedQuery(name = "Solucion.findBySolucodi", query = "SELECT s FROM Solucion s WHERE s.solucodi = :solucodi"),
    @NamedQuery(name = "Solucion.findBySolutipo", query = "SELECT s FROM Solucion s WHERE s.solutipo = :solutipo"),
    @NamedQuery(name = "Solucion.findBySolurequ", query = "SELECT s FROM Solucion s WHERE s.solurequ = :solurequ"),
    @NamedQuery(name = "Solucion.findBySoluprob", query = "SELECT s FROM Solucion s WHERE s.soluprob = :soluprob"),
    @NamedQuery(name = "Solucion.findBySolusolu", query = "SELECT s FROM Solucion s WHERE s.solusolu = :solusolu"),
    @NamedQuery(name = "Solucion.findBySoluobse", query = "SELECT s FROM Solucion s WHERE s.soluobse = :soluobse"),
    @NamedQuery(name = "Solucion.findBySolupeso", query = "SELECT s FROM Solucion s WHERE s.solupeso = :solupeso"),
    @NamedQuery(name = "Solucion.findBySolufeso", query = "SELECT s FROM Solucion s WHERE s.solufeso = :solufeso"),
    @NamedQuery(name = "Solucion.findBySolufesi", query = "SELECT s FROM Solucion s WHERE s.solufesi = :solufesi"),
    @NamedQuery(name = "Solucion.findBySoluterm", query = "SELECT s FROM Solucion s WHERE s.soluterm = :soluterm"),
    @NamedQuery(name = "Solucion.findBySoluesta", query = "SELECT s FROM Solucion s WHERE s.soluesta = :soluesta"),
    @NamedQuery(name = "Solucion.findBySolucoay", query = "SELECT s FROM Solucion s WHERE s.solucoay = :solucoay"),
    @NamedQuery(name = "Solucion.findBySoluclie", query = "SELECT s FROM Solucion s WHERE s.soluclie = :soluclie"),
    @NamedQuery(name = "Solucion.findBySolupere", query = "SELECT s FROM Solucion s WHERE s.solupere = :solupere"),
    @NamedQuery(name = "Solucion.findBySoluconf", query = "SELECT s FROM Solucion s WHERE s.soluconf = :soluconf"),
    @NamedQuery(name = "Solucion.findBySolumeco", query = "SELECT s FROM Solucion s WHERE s.solumeco = :solumeco"),
    @NamedQuery(name = "Solucion.findBySoluclas", query = "SELECT s FROM Solucion s WHERE s.soluclas = :soluclas"),
    @NamedQuery(name = "Solucion.findBySoluarch", query = "SELECT s FROM Solucion s WHERE s.soluarch = :soluarch"),
    @NamedQuery(name = "Solucion.findBySoluprio", query = "SELECT s FROM Solucion s WHERE s.soluprio = :soluprio"),
    @NamedQuery(name = "Solucion.findBySolusoli", query = "SELECT s FROM Solucion s WHERE s.solusoli = :solusoli"),
    @NamedQuery(name = "Solucion.findBySolucicl", query = "SELECT s FROM Solucion s WHERE s.solucicl = :solucicl"),
    @NamedQuery(name = "Solucion.findBySolufecc", query = "SELECT s FROM Solucion s WHERE s.solufecc = :solufecc"),
    @NamedQuery(name = "Solucion.findBySoludigi", query = "SELECT s FROM Solucion s WHERE s.soludigi = :soludigi"),
    @NamedQuery(name = "Solucion.findBySolupers", query = "SELECT s FROM Solucion s WHERE s.solupers = :solupers"),
    @NamedQuery(name = "Solucion.findBySoludevo", query = "SELECT s FROM Solucion s WHERE s.soludevo = :soludevo"),
    @NamedQuery(name = "Solucion.findBySolufede", query = "SELECT s FROM Solucion s WHERE s.solufede = :solufede"),
    @NamedQuery(name = "Solucion.findBySoludede", query = "SELECT s FROM Solucion s WHERE s.soludede = :soludede"),
    @NamedQuery(name = "Solucion.findBySolucali", query = "SELECT s FROM Solucion s WHERE s.solucali = :solucali"),
    @NamedQuery(name = "Solucion.findBySoluporc", query = "SELECT s FROM Solucion s WHERE s.soluporc = :soluporc"),
    @NamedQuery(name = "Solucion.findBySoluvweb", query = "SELECT s FROM Solucion s WHERE s.soluvweb = :soluvweb")})
public class Solucion implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "SOLUCODI")
    private Integer solucodi;
    @Size(max = 2)
    @Column(name = "SOLUTIPO")
    private String solutipo;
    @Column(name = "SOLUREQU")
    private Integer solurequ;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 1000)
    @Column(name = "SOLUPROB")
    private String soluprob;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 1000)
    @Column(name = "SOLUSOLU")
    private String solusolu;
    @Size(max = 1000)
    @Column(name = "SOLUOBSE")
    private String soluobse;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 6)
    @Column(name = "SOLUPESO")
    private String solupeso;
    @Column(name = "SOLUFESO")
    @Temporal(TemporalType.TIMESTAMP)
    private Date solufeso;
    @Column(name = "SOLUFESI")
    @Temporal(TemporalType.TIMESTAMP)
    private Date solufesi;
    @Size(max = 60)
    @Column(name = "SOLUTERM")
    private String soluterm;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 2)
    @Column(name = "SOLUESTA")
    private String soluesta;
    @Basic(optional = false)
    @NotNull
    @Column(name = "SOLUCOAY")
    private BigInteger solucoay;
    @Size(max = 16)
    @Column(name = "SOLUCLIE")
    private String soluclie;
    @Size(max = 6)
    @Column(name = "SOLUPERE")
    private String solupere;
    @Size(max = 1)
    @Column(name = "SOLUCONF")
    private String soluconf;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 2)
    @Column(name = "SOLUMECO")
    private String solumeco;
    @Size(max = 2)
    @Column(name = "SOLUCLAS")
    private String soluclas;
    @Size(max = 400)
    @Column(name = "SOLUARCH")
    private String soluarch;
    @Column(name = "SOLUPRIO")
    private Short soluprio;
    @Size(max = 100)
    @Column(name = "SOLUSOLI")
    private String solusoli;
    @Size(max = 1)
    @Column(name = "SOLUCICL")
    private String solucicl;
    @Column(name = "SOLUFECC")
    @Temporal(TemporalType.TIMESTAMP)
    private Date solufecc;
    @Size(max = 30)
    @Column(name = "SOLUDIGI")
    private String soludigi;
    @Size(max = 6)
    @Column(name = "SOLUPERS")
    private String solupers;
    @Size(max = 1)
    @Column(name = "SOLUDEVO")
    private String soludevo;
    @Column(name = "SOLUFEDE")
    @Temporal(TemporalType.TIMESTAMP)
    private Date solufede;
    @Size(max = 1000)
    @Column(name = "SOLUDEDE")
    private String soludede;
    @Column(name = "SOLUCALI")
    private Short solucali;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "SOLUPORC")
    private BigDecimal soluporc;
    @Column(name = "SOLUVWEB")
    private BigInteger soluvweb;
    @JoinColumns({
        @JoinColumn(name = "SOLUPROD", referencedColumnName = "OBPRPROD"),
        @JoinColumn(name = "SOLUOBJE", referencedColumnName = "OBPROBJE")})
    @ManyToOne(fetch = FetchType.LAZY)
    private Objeprod objeprod;
    @JoinColumn(name = "SOLUCADE", referencedColumnName = "CARECODI")
    @ManyToOne(fetch = FetchType.LAZY)
    private Causrequ solucade;

    public Solucion() {
    }

    public Solucion(Integer solucodi) {
        this.solucodi = solucodi;
    }

    public Solucion(Integer solucodi, String soluprob, String solusolu, String solupeso, String soluesta, BigInteger solucoay, String solumeco) {
        this.solucodi = solucodi;
        this.soluprob = soluprob;
        this.solusolu = solusolu;
        this.solupeso = solupeso;
        this.soluesta = soluesta;
        this.solucoay = solucoay;
        this.solumeco = solumeco;
    }

    public Integer getSolucodi() {
        return solucodi;
    }

    public void setSolucodi(Integer solucodi) {
        this.solucodi = solucodi;
    }

    public String getSolutipo() {
        return solutipo;
    }

    public void setSolutipo(String solutipo) {
        this.solutipo = solutipo;
    }

    public Integer getSolurequ() {
        return solurequ;
    }

    public void setSolurequ(Integer solurequ) {
        this.solurequ = solurequ;
    }

    public String getSoluprob() {
        return soluprob;
    }

    public void setSoluprob(String soluprob) {
        this.soluprob = soluprob;
    }

    public String getSolusolu() {
        return solusolu;
    }

    public void setSolusolu(String solusolu) {
        this.solusolu = solusolu;
    }

    public String getSoluobse() {
        return soluobse;
    }

    public void setSoluobse(String soluobse) {
        this.soluobse = soluobse;
    }

    public String getSolupeso() {
        return solupeso;
    }

    public void setSolupeso(String solupeso) {
        this.solupeso = solupeso;
    }

    public Date getSolufeso() {
        return solufeso;
    }

    public void setSolufeso(Date solufeso) {
        this.solufeso = solufeso;
    }

    public Date getSolufesi() {
        return solufesi;
    }

    public void setSolufesi(Date solufesi) {
        this.solufesi = solufesi;
    }

    public String getSoluterm() {
        return soluterm;
    }

    public void setSoluterm(String soluterm) {
        this.soluterm = soluterm;
    }

    public String getSoluesta() {
        return soluesta;
    }

    public void setSoluesta(String soluesta) {
        this.soluesta = soluesta;
    }

    public BigInteger getSolucoay() {
        return solucoay;
    }

    public void setSolucoay(BigInteger solucoay) {
        this.solucoay = solucoay;
    }

    public String getSoluclie() {
        return soluclie;
    }

    public void setSoluclie(String soluclie) {
        this.soluclie = soluclie;
    }

    public String getSolupere() {
        return solupere;
    }

    public void setSolupere(String solupere) {
        this.solupere = solupere;
    }

    public String getSoluconf() {
        return soluconf;
    }

    public void setSoluconf(String soluconf) {
        this.soluconf = soluconf;
    }

    public String getSolumeco() {
        return solumeco;
    }

    public void setSolumeco(String solumeco) {
        this.solumeco = solumeco;
    }

    public String getSoluclas() {
        return soluclas;
    }

    public void setSoluclas(String soluclas) {
        this.soluclas = soluclas;
    }

    public String getSoluarch() {
        return soluarch;
    }

    public void setSoluarch(String soluarch) {
        this.soluarch = soluarch;
    }

    public Short getSoluprio() {
        return soluprio;
    }

    public void setSoluprio(Short soluprio) {
        this.soluprio = soluprio;
    }

    public String getSolusoli() {
        return solusoli;
    }

    public void setSolusoli(String solusoli) {
        this.solusoli = solusoli;
    }

    public String getSolucicl() {
        return solucicl;
    }

    public void setSolucicl(String solucicl) {
        this.solucicl = solucicl;
    }

    public Date getSolufecc() {
        return solufecc;
    }

    public void setSolufecc(Date solufecc) {
        this.solufecc = solufecc;
    }

    public String getSoludigi() {
        return soludigi;
    }

    public void setSoludigi(String soludigi) {
        this.soludigi = soludigi;
    }

    public String getSolupers() {
        return solupers;
    }

    public void setSolupers(String solupers) {
        this.solupers = solupers;
    }

    public String getSoludevo() {
        return soludevo;
    }

    public void setSoludevo(String soludevo) {
        this.soludevo = soludevo;
    }

    public Date getSolufede() {
        return solufede;
    }

    public void setSolufede(Date solufede) {
        this.solufede = solufede;
    }

    public String getSoludede() {
        return soludede;
    }

    public void setSoludede(String soludede) {
        this.soludede = soludede;
    }

    public Short getSolucali() {
        return solucali;
    }

    public void setSolucali(Short solucali) {
        this.solucali = solucali;
    }

    public BigDecimal getSoluporc() {
        return soluporc;
    }

    public void setSoluporc(BigDecimal soluporc) {
        this.soluporc = soluporc;
    }

    public BigInteger getSoluvweb() {
        return soluvweb;
    }

    public void setSoluvweb(BigInteger soluvweb) {
        this.soluvweb = soluvweb;
    }

    public Objeprod getObjeprod() {
        return objeprod;
    }

    public void setObjeprod(Objeprod objeprod) {
        this.objeprod = objeprod;
    }

    public Causrequ getSolucade() {
        return solucade;
    }

    public void setSolucade(Causrequ solucade) {
        this.solucade = solucade;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (solucodi != null ? solucodi.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Solucion)) {
            return false;
        }
        Solucion other = (Solucion) object;
        if ((this.solucodi == null && other.solucodi != null) || (this.solucodi != null && !this.solucodi.equals(other.solucodi))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.smarttmt.smartmanager.entity.Solucion[ solucodi=" + solucodi + " ]";
    }
    
}
